import tkinter as tk
from tkinter import  ttk


def say_hi():
    print("互联网的广大朋友们大家好，我是小甲鱼！")


class App:
    def __init__(self, root):
        # 创建一个框架，然后在里边添加一个Button按钮组件
        frame = ttk.Frame(root)
        frame.pack()
        # 创建一个按钮组件，
        self.hi_there = ttk.Button(frame, text="打招呼", style="green/black.TButton", command=say_hi)
        self.hi_there.pack()


if __name__ == "__main__":
    root = tk.Tk()
    app = App(root)
    root.mainloop()